feat: Add AWS Bedrock Extended Thinking support for Claude models (#4201) #4480
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #4201
Adds AWS Bedrock Extended Thinking support for Claude Sonnet 4, Opus 4, and 3.7 Sonnet models. Users can now enable reasoning mode when using AWS Bedrock, matching the functionality available with the direct Anthropic provider.
Changes Made
API Implementation:
additionalModelRequestFields.thinkingconfiguration to Bedrock API payloadscontentBlockStart,contentBlockDelta)anthropic_versionparameter for thinking requestsshouldUseReasoningBudget()logicUI Updates:
Testing:
Technical Details
:thinkingmodel variantstopPparameter when thinking is enabled (AWS requirement)Testing
Files Changed
packages/types/src/providers/bedrock.ts- Type definitions for reasoningsrc/api/providers/bedrock.ts- Core thinking functionalitysrc/api/providers/__tests__/bedrock-reasoning.test.ts- Test coveragewebview-ui/src/components/settings/- UI improvements for reasoning controlsImportant
Adds AWS Bedrock Extended Thinking support for Claude models, enabling reasoning mode with API, UI, and testing updates.
additionalModelRequestFields.thinkingto Bedrock API payloads inbedrock.ts.contentBlockStart,contentBlockDelta) inbedrock.ts.anthropic_versionparameter for thinking requests inbedrock.ts.shouldUseReasoningBudget()logic inbedrock.ts.bedrock-reasoning.spec.ts.bedrock-reasoning.spec.ts.This description was created by
for 13e272c. You can customize this summary. It will automatically update as commits are pushed.